
<%@page import="java.util.List"%>
<%@page import="java.lang.Integer"%>
<%@page import="java.util.Iterator"%>
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
	pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>

</head>
<body>
<h3><a href="searchbook.jsp">Back</a></h3>
	<form name="form">
		<table>
			<tr>
				<td><b>Book ID</b>
				</td>
				<td><b>Book Name</b>
				</td>
				<td><b>Author Name</b>
				</td>
				<td><b>Date</b>
				</td>
				<td><b>Status</b>
				</td>
			</tr>
			<%
				Iterator itr;
			
				List data = (List) request.getAttribute("data");
				itr = data.iterator();
				while (itr.hasNext()) {
			%>
			<tr>
				<td><%= itr.next()%></td>
				<td><%= itr.next()%></td>
				<td><%=itr.next()%></td>
				<td><%=itr.next()%></td>
				<td>
					<%
						//for checking weather book is available or not 
							Object status = itr.next();
							String s = "1";
							if (status.equals(s)) {
					%>
					 <a href="issue.jsp">available</a>
					<%
			 	} 
							else {
 			out.println("Not Available");
 				}
 					%>
				</td>
					
			</tr>
			<%
				}
			%>
		</table>
	</form>

</body>
</html>